package com.thx.privilege.dao;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.thx.common.orm.HibernateBaseDao;
import com.thx.privilege.model.PrivilegeType;

@Repository
public class PrivilegeTypeDao extends HibernateBaseDao<PrivilegeType>{

	public PrivilegeType getByTypeKey(String typeKey) {
		String hql = "from PrivilegeType where typeKey=?";
		List<PrivilegeType> pts=createQuery(hql,typeKey).list();
	    if(pts!=null&&pts.size()>0){
	    	return pts.get(0);
	    }
	    return null;
	}

}
